/*
 * Copyright (C) 2013 Chen Hui <calmer91@gmail.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.sangcomz.fishbun;

import com.sangcomz.fishbun.permission.PermissionCheck;
import com.sangcomz.fishbun.util.CameraUtil;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;

public class BaseAbilitySlice extends AbilitySlice {

    public static final String PERMISSION_CALLBACK = "com.permission.callback";
    public static final String REQUEST_CODE = "requestCode";
    public static final String PERMISSIONS = "permissions";
    public static final String GRANT_RESULTS = "grantResults";
    public static final String OUT_STATE = "outState";
    public static final String IN_STATE = "inState";
    public static final String ON_SAVE_ABILITY_STATE = "onSaveAbilityState";
    public static final String ON_RESTORE_ABILITY_STATE = "onRestoreAbilityState";
    public static final int PERMISSION_STORAGE = 28;
    public static final int PERMISSION_CAMERA = 29;
    public static final int TAKE_A_NEW_PICTURE_RESULT_CODE = 29;
    public static final int TAKE_A_PICTURE_REQUEST_CODE = 128;
    public static final int ENTER_ALBUM_REQUEST_CODE = 129;
    public static final int ENTER_DETAIL_REQUEST_CODE = 130;
    public static final int RESULT_OK = -1;

    public static final String SAVE_INSTANCE_NEW_IMAGES = "instance_new_images";
    public static final String SAVE_INSTANCE_SAVED_IMAGE = "instance_saved_image";

    protected CameraUtil cameraUtil;
    protected PermissionCheck permissionCheck;

    @Override
    protected void onStart(Intent intent) {
        super.onStart(intent);
        cameraUtil = new CameraUtil();
        permissionCheck = new PermissionCheck(this);
    }
}
